<include file="Common/index_header-new" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/home/css/waitMe.css" />
<link rel="stylesheet" href="__PUBLIC__/home/v2/css/detail.css">
<!-- 详情页样式 -->
<link rel="stylesheet" href="__PUBLIC__/home/v2/css/default.min.css">
<script src="__PUBLIC__/home/v2/js/highlight.min.js"></script>
<!-- 代码框样式 -->
<div class="main-body">
	<div class="container">

		<!--面包屑 start-->
		<div class="address-column row">
			<div class="address pull-left">
				<i class="fa fa-map-marker"></i>
				<a href="/index/index.html" title="首页">首页</a>
				<a href="/index/detail.html?sid={$info.service_id}" title="{$info.service_name}">{$info.s_service_name}</a>
				<a class='active'>{$info.api_name}</a>
			</div>
		</div>
		<!--面包屑 end-->

		<div class="detail-body debugging">
			<h3>API调试工具</h3>
			<div class="tab-content">
				<div class="form-group">
					<label class="col-xs-12">服务名称:</label>
					<div class="col-xs-12 border-solid">
						{$info.s_service_name}
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12">API名称:</label>
					<div class="col-xs-12 border-solid">
						{$info.api_name}
					</div>
					<input type="hidden" class="_api_id" value="{$info.api_id}" />
				</div>
				<div class="form-group">
					<label class="col-xs-12">接口地址:</label>
					<div class="col-xs-12 border-solid _request_url" data-url="{$host}/open/{$info.s_service_name_en}/{$info.api_name_en}" data-method="{$info.api_request_method}">
						{$host}/open/{$info.s_service_name_en}/{$info.s_service_name_en}/{$info.api_name_en}
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12">请求方式:</label>
					<div class="col-xs-12 border-solid">
						<if condition="$info['api_request_method'] eq 0">
							GET/POST
							<elseif condition="$info['api_request_method'] eq 1" /> POST
							<else /> GET
						</if>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12">请求参数:</label>
					<div class="col-xs-12 padding-0">
						<table class="table table-detail table-striped table-hover">
							<colgroup>
								<col class="col-xs-2">
								<col class="col-xs-1">
								<col class="col-xs-1">
								<col class="col-xs-4">
								<col class="col-xs-4">
							</colgroup>
							<thead>
								<tr>
									<th>名称</th>
									<th>类型</th>
									<th>是否必填</th>
									<th>说明</th>
									<th>值</th>
								</tr>
							</thead>
							<tbody class='_reqParamter'>
								<?php $api_request_params = json_decode($info['api_request_param'],true);?>
								<foreach name="api_request_params" item="param" key="key">
									<tr>
										<td>{$param.name}</td>
										<td>{$param.type}</td>
										<td>
											<if condition="$param['mast'] eq 1">是
												<else />否</if>
										</td>
										<td class="pr">{$param.desc}</td>
										<td class="padding-2">
											<input type="text" class="form-control input-sm _api_request_params" data-name="{$param.name}" value="{$param.default_value}"></td>
										</td>
									</tr>
								</foreach>
							</tbody>
						</table>
					</div>
				</div>
				<div class="form-group margin-top-30">
					<button class="btn btn-primary btn-routine detail-bottom pull-left _tools_http" id='_tools_http'>模拟请求</button>
				</div>
				<div class="form-group">
					<label class="col-xs-12">请求详情:</label>
					<div class="col-xs-12 border-solid background-fa _api_http_content"></div>
				</div>
				<div class="form-group border-0">
					<label class="col-xs-12">JSON返回示例:</label>
					<div class="col-xs-12 padding-0">
						<pre><code class="JSON" id="_json_text"></code></pre>
					</div>
				</div>
			</div>

		</div>

	</div>
</div>
<!--引导注册弹窗 start-->
<div class="modal fade modal-login _loginBox" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
			</div>
			<div class="modal-body">
				<p class='_loginText'>免费注册<br/>调试数据</p>
				<div class="form-group">
					<div class="input-group">
						<div class="input-group-addon"> <i class="fa fa-envelope"></i> </div>
						<input type="text" class="form-control _user_email" placeholder="请输入您的邮箱" tip="邮箱不能为空" />
					</div>
				</div>
				<div class="form-group">
					<div class="input-group">
						<div class="input-group-addon"> <i class="fa fa-key"></i> </div>
						<input type="password" class="form-control _passwd" placeholder="6-16位字符，区分大小写" tip="密码不能为空" />
					</div>
				</div>
				<div class="form-group">
					<input type="checkbox" checked="checked" class="_checkBox"> 我已阅读并接受
					<a href="/help/user_agreen" target="_blank">《云途数据用户服务协议》</a>
				</div>
				<button type="submit" class="btn btn-primary btn-block btn-login _register">注&nbsp;&nbsp;册</button>
				<div class="modal-login-bottom">已有账号？去
					<a href="/member/login.html" class="_gotoLogin">登录</a>。</div>
			</div>
		</div>
	</div>
</div>
<!--引导注册弹窗 end-->
<include file="Common/index_footer-new" />
<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>

<script src='__PUBLIC__/home/js/tools.js?v=20161027'></script>
<script src="__PUBLIC__/home/js/cookie.js"></script>
<script src='__PUBLIC__/home/js/memberV2.js?v=20161027'></script>
</body>

</html>